﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Robin.Domain.Entities;
using Robin.NHibernate.EntityMappings;

namespace Smart.Project.Data
{
    public class MDepartmentMap : EntityMap<MDepartment, string>
    {
        public MDepartmentMap() : base("PM_DEPARTMENT")
        {
            Id(x => x.Id);
            Map(x => x.BMMC);
            Map(x => x.BMBM);
            Map(x => x.PHONE);
            Map(x => x.UPDATEUSER);
            Map(x => x.UPDATETIME);
            Map(x => x.CREATEUSER);
            Map(x => x.CREATETIME);
            Map(x => x.ISVALID);
            Map(x => x.EXTENDCODE);
            Map(x => x.EXTENDCODE2);
            Map(x => x.EXTENDCODE3);
            Map(x => x.EXTENDCODE4);
            Map(x => x.EXTENDCODE5);
            Map(x => x.MANAGER);
            //References(o => o.MANAGER).Not.LazyLoad().Column("MANAGER");
        }
    }
    /// <summary>
    /// 部门
    /// </summary>
    public class MDepartment : Entity<string>
    {
        /// <summary>
        /// 部门名称
        /// </summary>
        public virtual string BMMC { get; set; }
        /// <summary>
        /// 部门编码
        /// </summary>
        public virtual string BMBM { get; set; }
        /// <summary>
        /// 管理人
        /// </summary>
        public virtual string MANAGER { get; set; }
        /// <summary>
        /// 电话
        /// </summary>
        public virtual string PHONE { get; set; }
        /// <summary>
        /// 修改人
        /// </summary>
        public virtual string UPDATEUSER { get; set; }
        /// <summary>
        /// 记录更新时间
        /// </summary>
        public virtual Decimal UPDATETIME { get; set; }
        /// <summary>
        /// 创建人
        /// </summary>
        public virtual string CREATEUSER { get; set; }
        /// <summary>
        /// 记录创建时间
        /// </summary>
        public virtual Decimal CREATETIME { get; set; }
        /// <summary>
        /// 是否有效1有效，0无效
        /// </summary>
        public virtual string ISVALID { get; set; }
        /// <summary>
        /// 拓展字段
        /// </summary>
        public virtual string EXTENDCODE { get; set; }
        /// <summary>
        /// 拓展字段2
        /// </summary>
        public virtual string EXTENDCODE2 { get; set; }
        /// <summary>
        /// 拓展字段3
        /// </summary>
        public virtual string EXTENDCODE3 { get; set; }
        /// <summary>
        /// 拓展字段4
        /// </summary>
        public virtual string EXTENDCODE4 { get; set; }
        /// <summary>
        /// 拓展字段5
        /// </summary>
        public virtual string EXTENDCODE5 { get; set; }
    }

}
